package com.fccommunity.ui;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.fccommunity.R;
import com.fccommunity.base.BaseActivity;
import com.fccommunity.widget.TitleBar;

/**
 * Created by yiwei on 16/4/22.
 */
public class LoginActivity extends BaseActivity{


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_login);

        findViewById(R.id.registBt).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                startActivity(MainActivity.newIntent(context));
            }
        });
        findViewById(R.id.forgetPwdTv).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                startActivity(new Intent(context, ForgetPwdActivity1.class));
            }
        });

    }

    @Override
    protected void initTitle() {
        titleBar.setTitle("登录");
        TextView textView = (TextView)titleBar.addAction(new TitleBar.TextAction("注册") {
            @Override
            public void performAction(View view) {
                startActivity(RegisterActivity.newIntent(context));
            }
        });
        textView.setTextColor(getResources().getColor(R.color.white));
    }
}
